LoginOpenIdAuth
loginOpenIdAuth (openIdToken: string): string
- The login function, like initialize, authenticates the user and stores the result into the embed cookie.
- The function has one argument - OpenId OAuth token.
- The function returns the authentication token string.
Example
The following initializes a new embed client for the target instance of Pyramid and authenticates a new user using the OpenId token. The token needs to be derived from the OpenId authentication into the host site and injected into the API as per the example below. Alternatively, the same process can be resolved using server-side code using the REST API's directly.
var client = new pyramidEmbedClient(https://analytics.pyramid.com); client. loginOpenIdAuth ("OPENIDTOKEN").then(token => { client.init(); });